<template>
  <view>
    <view class="cu-list menu solid-bottom" v-for="(item,idx) in list" :key="idx" @tap="gotoDetail(item.id)">
      <!-- 图标 + 标题、arrow 带箭头 -->
      <view class="cu-item arrow">
        <view class="content">
          <text class="h-title"> {{item.helpTitle}} </text>
        </view>
      </view>
    </view>
  </view>
</template>


<script setup lang="ts">
import {ref, onMounted, computed, reactive} from 'vue';
import {getHelpList} from '../../common/api/user'
const list = reactive([])

const gotoDetail = (id) => {
  uni.navigateTo({
    url: `/pages/user/helpDetail?id=${id}`
  })
}

onMounted(async () => {
  await getHelpList().then(res => {
    if (res.code == 200) {
      res.data.forEach(item=>{
        list.push(item)
      })
    }
  })
})
</script>

<style  lang="scss" scoped>
.h-title{
  font-size: 32rpx;
  color: #1A1A1A;
}

</style>